package kse;

public class J01Retangle {
	// 사각형 면적, 둘레 계산하는 프로그램
	// 입력값:가로,세로,색상
	public static void main(String[] args) {
		// 변수선언 및 초기화, 계산 및 연산, 결과 출력
		double width = 1.0; // 실수 double
		double height = 1.0;
		String color = "white"; // 문자열 Strinf
		double getArea;
		double getPerimeter;

		getArea = width * height;
		getPerimeter = (width + height) * 2;

		System.out.println(width);
		System.out.println(height);
		System.out.println(getArea);
		System.out.println(getPerimeter);
		System.out.println(color);

		// 시험값1 : 4,40,red
		width = 4;
		height = 40;
		color = "red";

		getArea = width * height;
		getPerimeter = (width + height) * 2;

		System.out.println(width);
		System.out.println(color);
		System.out.println(getArea);
		System.out.println(getPerimeter);

		// 시험값2: 3.5,35.9, orange

		width = 3.5;
		height = 35.9;
		color = "orange";

		getArea = width * height;
		getPerimeter = (width + height) * 2;

		System.out.println(width);
		System.out.println(getArea);
		System.out.println(getPerimeter);
		System.out.println(color);

	}
}
